Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support optional mTLS #28

Merged
merged 3 commits into from
May 14, 2024
Merged

Support optional mTLS #28

merged 3 commits into from
May 14, 2024

Conversation

shakeelrao
Copy link
Contributor

@shakeelrao shakeelrao commented May 13, 2024

Add support for creating namespaces with API key authentication / optional mTLS.

Example configurations w/ Go:

// Create a "restricted" NS (no auth method specified).
ns := &namespace.NamespaceSpec{
  Name:  name,
  Regions: regions,
  MtlsAuth: &namespace.MtlsAuthSpec{}, /* or omitted */
  ApiKeyAuth: &namespace.ApiKeyAuthSpec{}, /* or omitted */
  RetentionDays: retention,
}

// Create a NS with mTLS auth.
ns := &namespace.NamespaceSpec{
  Name:  name,
  Regions: regions,
  MtlsAuth: &namespace.MtlsAuthSpec{
    AcceptedClientCa: clientCA,
    Enabled: true,
  },
  ApiKeyAuth: &namespace.ApiKeyAuthSpec{}, /* or omitted */
  RetentionDays: retention,
}

// Create a NS with API keys auth.
ns := &namespace.NamespaceSpec{
  Name:  name,
  Regions: regions,
  MtlsAuth: &namespace.MtlsAuthSpec{}, /* or omitted */
  ApiKeyAuth: &namespace.ApiKeyAuthSpec{
    Enabled: true,
  },
  RetentionDays: retention,
}

// Create a NS with mTLS and API key auth.
ns := &namespace.NamespaceSpec{
  Name:  name,
  Regions: regions,
  MtlsAuth: &namespace.MtlsAuthSpec{
    AcceptedClientCa: clientCA,
    Enabled: true,
  },
  ApiKeyAuth: &namespace.ApiKeyAuthSpec{
    Enabled: true,
  },
  RetentionDays: retention,
}

@@ -3,7 +3,7 @@ deps:
- buf.build/googleapis/googleapis
breaking:
use:
- FILE
- WIRE
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temporary change to pass CI, will revert after.

@shakeelrao shakeelrao merged commit a429e6c into main May 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants